home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Broadcaster / Protocols / SavingOption.h < prev   
Encoding:
Text File  |  1997-06-28  |  463 b   |  32 lines  |  [TEXT/CWIE]

  1. // SavingOption.h
  2.  
  3. #ifndef SavingOption_h
  4. #define SavingOption_h
  5.  
  6. class SavingOption
  7.   {
  8.     public:
  9.         enum Choice
  10.           {
  11.             save,
  12.             dontSave,
  13.             ask
  14.           };
  15.     
  16.     private:
  17.         Choice choice;
  18.     
  19.     public:
  20.         SavingOption( Choice c )
  21.           : choice( c )
  22.           {}
  23.         
  24.         operator Choice() const        { return choice; }
  25.         Choice Value() const            { return choice; }
  26.         
  27.         bool operator==( Choice c )    { return choice == c; }
  28.         bool operator!=( Choice c )    { return choice != c; }
  29.   };
  30.  
  31. #endif
  32.